# list1 = [1,2,3,4,5]

# list1[1] = 10

# list1.insert(2,"coconet")

# print(list1[1])
# print(list1)



# dict1 = {"name":"Hatsune_Miku","age":16,"height":158,"weight":42}

# print(dict1["name"]) 

# print(dict1["age"])

# print(dict1.values())

# print(dict1.keys())

# list  index(指索引序号X)   用中括号
# dict  set                 用大括号

# a = 1

# b = 3

# # 字符串拼接，前后都得是字符串 str(a)
# print("a:"+str(a))


# while True:
#     answer = int(input("python笑传之猜猜宝"))
#     if int(answer) ==39:
#         print("你过关！")
#         break
#     elif int(answer) >45:
#         print("too big")
#     elif int(answer) <20:
#         print("too small")
#     elif 39<int(answer)<=45:
#         print("呃呃呃，我什么也不会告诉你的，呃呃呃呃啊啊啊")
#     elif 20<=int(answer)<39:
#         print("呃呃呃，我什么也不会告诉你的，呃呃呃呃啊啊啊")

# for i in range(1,11):
#     print(i,end=" ")
#     # for j in range(1,11):
        # print(j)

# a=int(input("输入"))
# b=int(input("输入"))
# def sum(a,b):
#     return (a+b)
# result = sum(a,b)
# print(result)

# def generate_powers_of_two(n):
#     """
#     返回前 n 个 2 的幂，序列从 1 开始。
#     示例：n=5 → [1, 2, 4, 8, 16]
#     """
#     if n < 0:
#         raise ValueError("n 必须是非负整数")
#     # 使用列表推导式快速生成
#     return [2**i for i in range(n)]


# print(generate_powers_of_two(5))   # 输出: [1, 2, 4, 8, 16]


# def get_integer_in_Range(prompt,min_Value,max_Value):
#     while True:
#         age = int(prompt)
#         if min_Value<=age <=max_Value:
#             return prompt
#         else :
#             print("请输入范围内的数字")
#             break


# if __name__ == "__main__":
#     # prompt=input("输入数字")
#     min_Value =1
#     max_Value =139
# while True:
#     prompt=input("输入数字")
#     get_integer_in_Range(prompt,min_Value,max_Value)


# print("A\n,"" B./n"," C./n ","D./n")

# def make_lowercase(text:str):
#     return text.lower()

# print(make_lowercase("HELLO,WORLD"))

# total = 0

# def add_five():
#     total = total + 5  # ERROR! Why?
#     print(total)

# add_five()

# total = 0

# def add_five_global():
#     global total
#     total = total + 5
#     print(total)

# add_five_global()


# try:
#     with open("file.txt", "r") as f:
#         # 处理文件内容
#         pass
# except FileNotFoundError:
#     print("文件不存在，正在创建新文件...")
#     with open("file.txt", "w") as f:
#     # 可以写入一些初始内容
#         pass

# def count_lines(filename):
#     try:
#         with open(filename,"r") as f:
#             lines = f.readlines()
#             return len(lines)
#     except FileNotFoundError:
#         return "找不到文件捏"
    
# print(count_lines("poem.txt"))



# def is_positive(number):
#     """检查数字是否为正数"""
#     return number > 0


# def string_to_int(text):
#     """安全地将字符串转换为整数"""
#     try:
#         number = int(text)
#         return number
#     except ValueError:
#         return None

# def get_valid_age():
#     """从用户获取有效的年龄"""
#     while True:
#         user_input = input("Enter your age: ")
#         age = string_to_int(user_input)

#         if age is None:
#             print("Invalid! Please enter a number.")
#             continue

#         if not is_positive(age):
#             print("Age must be positive!")
#             continue

#         return age
    

# print(get_valid_age())
# [n for n in items if ...]
# numbers = [45, 12, 78, 23, 56, 89, 34, 67]

# def get_first_three(items):
#     return items[:2]
# print(get_first_three(numbers))


# my_array =list(range(1,101))
# def binary_search(arr, target):

#     left, right = 0, len(arr) - 1
#     while left <= right:
#         mid = (left + right) // 2
#         mid_val = arr[mid]

#         if mid_val == target:
#             return mid
#         elif mid_val < target:
#             left = mid + 1
#         else:
#             right = mid - 1
#     return -1



# def reverse_list(items):
#     reversed_items = []
#     for i in range(len(items) - 1, -1, -1):
#         reversed_items.append(items[i])
#     return reversed_items

# print(reverse_list(items))

# def count_occurrences(items, target):
#     a = 0
#     for i in items:
#         if i ==target:
#             a=a+1
#         if i !=target:
#             a=a
#     return a
# items = [1,1,1,1,1,1,1,9,9,9]
# print(count_occurrences(items, 9))
items = list(range(0,101))
def chunk_list(items, chunk_size):
    chunks =[]
    for i in range(1,len(items),chunk_size):
        chunk = items[i-1:i+chunk_size-1]
        chunks.append(chunk)
    return chunks


print(chunk_list(items, 10))